package com.tinfeng.uplevel;

import java.io.*;

public class JavaIo {
    public static void main(String[] args) throws IOException {
        String line;
        int b = 0;

        // 读入
        FileInputStream fileInputStream = new FileInputStream("C:\\Users\\U\\Desktop\\work_note\\监控设置.txt");
        // 输出
        FileOutputStream fileOutputStream = new FileOutputStream("C:\\Users\\U\\Desktop\\work_note\\监控设置1.txt");
        // 转格式
        //InputStreamReader reader = new InputStreamReader(fileInputStream,"UTF-8");
        //OutputStreamWriter streamWriter = new OutputStreamWriter(fileOutputStream,"UTF-8");
        //BufferedReader br = new BufferedReader(reader);
        // 显示
//        while ((line = br.readLine()) !=null) {
//            System.out.println(line);
//        }
        // 不处理格式就成功了 不乱码 妈的fuck  单输出流可以转换下格式
        // 输出
         while ((b=fileInputStream.read()) !=-1) {
             fileOutputStream.write(b);

         }
        // 关闭流
        fileInputStream.close();
//        br.close();
//        reader.close();
        fileOutputStream.close();

    }
}
